import { ref } from 'vue'

export const getData = () => {
  const hour = Math.ceil(new Date().getHours())
  const str = ref('')
  if (hour <= 9) {
    str.value = '早上好'
  } else if (hour < 12) {
    str.value = '上午好'
  } else if (hour == 12) {
    str.value = '中午好'
  } else if (hour <= 18) {
    str.value = '下午好'
  } else if (hour <= 24) {
    str.value = '晚上好'
  }
  return {
    str,
  }
}
